1. Field of the Invention
The present invention relates to the testing of microprocessors. It more specifically relates to a method and device of digital data transmission between a monitoring circuit integrated in a microprocessor chip and an analysis tool.
2. Discussion of the Related Art
FIG. 1 schematically shows an integrated circuit 10 comprising a microprocessor (μP) 12, an internal memory (MEM) 14, and input/output terminals (I/O) 16. Microprocessor 12 is intended to execute a program or a software stored in memory 14. Under control of the program, microprocessor 12 may process data provided by input/output terminals 16 or stored in memory 14 and read or write data through input/output terminals 16.
To check the proper operation of the microprocessor, a monitoring circuit 18 (TEST) is generally integrated on integrated circuit 10. Monitoring circuit 18 is capable of reading specific data provided by microprocessor 12 on execution of a program, and of possibly processing the read data. Test terminals 22 connect monitoring circuit 18 to an analysis tool 24. Analysis tool 24 may process the received signals, for example, according to commands provided by a user, and ensure a detailed analysis of the operation of microprocessor 12. In particular, analysis tool 24 may determine the program instruction sequence really executed by microprocessor 12.
The number of test terminals 22 may be on the same order of magnitude as the number of input/output terminals 16, for example, from 200 to 400 terminals. Test terminals 22 as well as the connections of monitoring circuit 18 take up a significant silicon surface area, which causes an unwanted increase in the circuit cost. For this purpose, a first version of integrated circuit 10 comprising monitoring circuit 18 and test terminals 22 is produced in small quantities to debug the program of microprocessor 12 or “user program”. After this debugging, a version of integrated circuit 10 without monitoring circuit 18 and of test terminals 22 is sold. This requires forming of two versions of the integrated circuit, which requires a significant amount of work and is relatively expensive. Further, the final chip is not necessarily identical to the tested chip.
To overcome the above-mentioned disadvantages, it is desired to form a monitoring circuit 18 which takes up a reduced surface area and only requires a reduced number of test terminals 22, which decreases the cost of the monitoring circuit. Monitoring circuit 18 can then be left on the finally sold integrated circuit 10.
It is thus desired to decrease the number of signals provided by monitoring circuit 18. For this purpose, certain logic operations are directly performed at the level of monitoring circuit 18 on the data measured at the level of microprocessor 12, to only transmit messages having an important information content.
Thus, standard IEEE-ISTO-5001 in preparation provides, in its 1999 version, accessible, for example, on website www.ieee-isto.org/Nexus5001, a specific message exchange protocol between a monitoring circuit and an analysis tool for a monitoring circuit 18 requiring but a reduced number of test terminals 22.
The monitoring circuit is provided to monitor the microprocessor operation and to provide the test terminals with predetermined messages only when certain predetermined instructions are executed. The messages may indicate how many instructions have been executed since the previous message. Messages may also be provided to indicate that certain predetermined points of the program have been reached. The analysis tool is provided to reconstitute the microprocessor operation, that is, the program execution in the microprocessor, based on the received messages and on the program code. The list of the message types and their structure are described in section 6 of standard IEEE-ISTO-5001. Each message is divided into packets of variable size and comprises at least one packet. In each packet, the bits are classified from left to right by order of increasing significance. Standard IEEE-ISTO-5001 provides that a message can comprise packets of a size which is either set by the standard or variable (set by the user). For simplicity, it is considered hereafter that a packet of variable size may comprise one or several packets, not shown, of fixed size.
To limit the number of test terminals, each packet is divided into segments of n bits, where n for example ranges between 4 and 16, transmitted by an n-bit MDO bus. The n least significant bits of the first data packet of the message are copied bit by bit into a first segment, after which the n remaining least significant bits of the data packet are copied bit by bit into a second segment, and so on until each bit in the packet has been copied. The unused most significant bits of the last segment thus formed receive a predetermined value, for example, 0. Each data packet is, as previously, divided into segments. The segments are sequentially transmitted by bus MDO, at the rate of a clock signal, not shown, specific to the monitoring circuit. To enable reconstruction of the data packets from the segments, it is provided to transmit with each segment on additional test terminals a code MSEO which enables the analysis tool to identify the nature of the data contained in the segment. Standard IEEE-ISTO-5001 provides codes MSEO for identifying that a segment contains: a message start (segment SM), intermediary data (segment NT), a packet end (segment EP), a message end (segment EM), or that this segment is an empty segment (segment ID) corresponding to an idle period between two messages.
Rather than directly identifying each segment by a specific code, which would require at least three bits, standard IEEE-ISTO-5001 provides giving code MSEO a specific value which, if the type of the preceding segment is known, enables determining the type of the transmitted segment. The MSEO code identifies the transition between the preceding code and the transmitted segment.
FIG. 2 schematically illustrates all the possible successions of segments provided by standard IEEE-ISTO-5001. The circles bearing references SM, NT, EP, EM, and ID each represent a transmitted segment type. The arrows joining two circles indicate that the two corresponding segments can be transmitted one after the other. An arrow starting from a circle to return thereto indicates that a segment of this type can be transmitted several times in a row. For example, a segment SM can follow a segment SM. This indicates that the sent message is very short and comprises a single packet of a length shorter than or equal to one segment. In other words, first segment SM contains both the start and the end of a message. A segment SM can be transmitted after a segment SM, EM, or ID, and a segment ID can be transmitted after a segment EM or ID. Similarly, a segment NT or EM can be transmitted after a segment SM, NT, or EP. Finally, a segment EP can be transmitted after a segment SM, NT, or EP.
FIG. 2 also illustrates the value taken by code MSEO according to the type of transmitted segment and to the preceding segment type. The MSEO code value associated with each transmitted segment is the value associated with the arrow going from the previous segment to the transmitted segment. A segment SM is identified by a value 00 of code MSEO if the previous segment was an EM or ID segment, and it is identified by a value 10 if the previous segment was an SM segment. A segment NT is identified by a value 00 of code MSEO whatever the previous segment. A segment EP is identified by a value 01 of code MSEO whatever the previous segment. A segment of EM or ID type is identified by a value 11 of code MSEO whatever the previous segment.
On reception of the segments, the analysis tool reconstitutes the packets of each message by arranging end-to-end the segments containing the data of a same packet.
FIG. 3A illustrates as an example the transmission of a message 30 comprising three packets 31, 32, and 33 respectively having 9, 20, and 11 bits. FIG. 3A also illustrates the MSEO code which is transmitted with each segment of message 30. To transmit message 30 over a bus MDO of n=8 bits, the first packet 31 is divided into a first message start segment 311 (MSEO=00 assuming that the previous segment was a segment ID) containing the 8 least significant bits of packet 31 and a second packet end segment 312 (MSEO=01) containing the most significant bit of packet 31, followed by 7 zeros. Similarly, packet 32 is divided into three segments 321 (of type NT, MSEO=00), 322 (of type NT, MSEO=00), and 323 (of type EP, MSEO=01) respectively containing the 8 least significant bits, the 8 next least significant bits, and the 4 most significant bits of packet 32, followed by 4 zeros. Packet 33 is divided into two segments, 331 (of type NT, MSEO=00) and 332 (of type EM, MSEO=11) respectively containing the 8 least significant bits and the 3 most significant bits of packet 33, followed by 5 zeros.